<include file="Public:head" />
<style>

    .table-striped tr  .td_dan{
        line-height: 30px;text-align: right;width: 50px
    }
    .width20{
        width: 260px;
    }
</style>
<body class="overflow-hidden">
<div class="wrapper preload">
    <include file="Public:header" />
    <include file="Public:left" />
    <div class="main-container">
        <div class="padding-md">
            <div class="row">
                <div class="col-sm-12">
                    <div class="page-title">
                        查新站默认设置
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="smart-widget widget-green">
                        <form action="__SELF__" method="post" class="form-admin10">
                            <div style="font-size: 11px;color: #333333;width: 93%;margin-left: 2%;margin-top: 2%;font-family: 'Microsoft YaHei';">
                                <div style="width: 100%;text-align: left;">
                                    <p style="font-size: 20px;">查新站默认设置</p>
                                </div>
                                <div style="width: 100%;text-align: left;margin-top: 50px;">
                                    <p style="font-size: 15px;">社会科技查新委托默认处理查新站设置:</p>
                                </div>
                                <div style="font-size: 15px;line-height: 45px;text-align: left;padding-left: 150px;">
                                    <input type="radio" name="chose" value="1" id="shkjcx_1" onclick="$('.org').hide();" ><label for="shkjcx_1" style="font-weight: normal"> 随机分配</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <input type="radio" name="chose" value="2" id="shkjcx_2" onclick="$('.org').show();"><label for="shkjcx_2" style="font-weight: normal">按工作日轮流分配</label>
                                </div>
                                <div style="width: 100%;text-align: left;margin-top: 50px;" class="org">
                                    <p style="font-size: 15px;">默认处理查新站分配:</p>
                                </div>
                            </div>
                            <table class="gridtable" style="font-family: '微软雅黑';margin-top: 0%;">
                                <thead>
                                <tr class="result_list org" id="org">
                                    <volist name="list" id="item">
                                        <td style="font-size: 15px;line-height: 50px;float: left;width: 120%;height: 50px;padding-left: 130px" >
                                            <input type="hidden" name="it[1][id][]" value="{$item.id}">
                                            <input type="text"  name="it[1][start_day][]" style="width: 110px;display: inline-block"class="form-control" value="{$item.start_day}" onClick="WdatePicker()">-
                                            <input type="text"  name="it[1][end_day][]" style="width: 110px;display: inline-block"class="form-control"value="{$item.end_day}"onClick="WdatePicker()">
                                            <select name="it[1][school][]" class="form-control" style="width: 180px;display: inline-block">
                                                <volist name='schoolList' id='vo'>
                                                    <option  value='{$vo.id}'<if condition="$vo.id eq $item['value']">selected</if>>{$vo.name}</option>
                                                </volist>
                                            </select>
                                            <a onclick="if(!confirm('是否确认删除该记录？')){return false;}" href="{:U('del',array('id'=>$item['id']))}" style="color:#000000;cursor: pointer;font-weight: 800;text-decoration:none">—</a>
                                        </td>
                                    </volist>
                                    <td style="font-size: 15px;line-height: 50px;float: left;padding-left: 130px;height: 50px;" class="add" >
                                        <input type="text"  name="it[2][start_day][]" style="width: 110px;display: inline-block"class="form-control"onClick="WdatePicker()" placeholder="开始时间">-
                                        <input type="text"  name="it[2][end_day][]" style="width: 110px;display: inline-block"class="form-control" onClick="WdatePicker()" placeholder="结束时间">
                                        <select name="it[2][school][]" id="school" class="form-control" style="width: 180px;display: inline-block">
                                            <option value='0' selected>请选择</option>
                                            <volist name='schoolList' id='vo'>
                                                <option value='{$vo.id}'>{$vo.name}</option>
                                            </volist>
                                        </select>
                                        <a onclick="del1();"class='asdasd'style="color:#000000;cursor: pointer;font-size: 30px;text-decoration:none;display:none">&minus;</a>
                                        <div class="jiajian_c" style="right: 100px;bottom: 87px;display: inline-block">
                                            <!--<a onclick="del1();"style="color:#000000;cursor: pointer;font-size:30px ;text-decoration:none">&minus;</a>-->
                                            <a onclick="add1();"style="color:#000000;cursor: pointer;font-size:30px ;text-decoration:none;line-height: 10px;">+</a>
                                        </div>
                                    </td>
                                </tr>
                                </thead>
                                <tbody id="test">

                                </tbody>
                                <tfoot>
                                    <tr class="result_list">
                                        <td style="height: 80px">
                                            <button class="action-button ajax-post" target-form="form-admin10" type="submit">保存设置</button>
                                        </td>
                                    </tr>
                                </tfoot>
                            </table>
                        </form>
                    </div><!-- ./smart-widget -->
                </div><!-- ./col -->
            </div><!-- ./row -->
        </div><!-- ./padding-md -->
    </div><!-- /main-container -->
    <include file="Public:foot" />
</div><!-- /wrapper -->
<!--<include file="Public/base_fc" />-->
<a href="#" class="scroll-to-top hidden-print"><i class="fa fa-chevron-up fa-lg"></i></a>
</body>
</html>
<block name="script">
    <script>
        $(function(){
            highlight_nav2('{:U("Set/school_set")}');
            if({$chose} == 1){
                $('.org').hide();
            }else{
                $('.org').show();
            }

        })
        function add1(){
            var input_add='<tr ><td colspan="2" style="font-size: 15px;line-height: 31px;float: left; padding-left: 130px;" class="add">' +
                    ' <input type="text"  name="it[2][start_day][]" style="width: 110px;display: inline-block"class="form-control"onClick="WdatePicker()">- ' +
                    '<input type="text"  name="it[2][end_day][]" style="width: 110px;display: inline-block"class="form-control" onClick="WdatePicker()"> ' +
                    '<select name="it[2][school][]" id="school" class="form-control" style="width:180px;display: inline-block"> ' +
                    "<option value='0' selected>请选择</option> " +
                    "<volist name='schoolList' id='vo'> " +
                    "<option value='{$vo.id}'>{$vo.name}" +
                    "</option> " +
                    "</volist> " +
                    "</select>" +"<a onclick='del1();'class='asdasd'style='margin-left:7px;color:#000000;cursor: pointer;font-size: 30px;text-decoration:none;display:none'>&minus;</a>"+
                    " </td></tr>";
            $('#test').append(input_add);
//            $('#org .add').html('<a onclick="del1();"style="color:#000000;cursor: pointer;font-weight: 800;text-decoration:none"><span class="glyphicon glyphicon-minus"></span></a>');
            $(".asdasd").show();
        }
        function del1(){
            $("#test .add:eq(0)").remove();
        }
        <present name="chose">
                Think.setValue("chose", {$chose|default=1});
        </present>
        <present name="item.id">
                Think.setValue('school',{$item.value});
        </present>

    </script>
</block>
